/*
 * @Author: your name
 * @Date: 2021-10-25 10:04:45
 * @LastEditTime: 2021-10-28 11:04:08
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \vue_admin\src\mock\createDB.ts
 */
import ZyDB from '@/mock/zyDB'
import md5 from 'js-md5'

// 创建数据库
const db = new ZyDB('vue_admin').open()

// 创建表名，key主键，incmt主键自动增长
db.createTB(
  'users_table',
  { key: 'id', incmt: true },
  { 
    userName: 'wzy', 
    password: md5('111111'),
    name:'远哥',
    roleId: null,  
    phoneNum: '18779434489', 
    avatar: require('@/assets/admin.jpg'), 
    departmentId: null, 
    email:'1983389791@qq.com',
    status: 1
  }
)

db.createTB(
  'roles_table',
  { key: 'id', incmt: true },
)

db.createTB(
  'departments_table',
  { key: 'id', incmt: true },
)
export default db
